home *** CD-ROM | disk | FTP | other *** search
/ Software Vault: The Gold Collection / Software Vault - The Gold Collection (American Databankers) (1993).ISO / cdr49 / 215_01.zip / BBSCDEF.H < prev    next >
Text File  |  1980-01-01  |  6KB  |  168 lines

  1. /*
  2.     bbscdef.h
  3.  
  4.     Global defines and storage definitions for use by
  5.     BBSc system.
  6.  
  7.     NOTE:    BDS C treats global variable like a FORTRAN COMMON
  8.         block, hence all programs that use these externals
  9.         must define them in the same order and for the same
  10.         length, AND they all must be recompiled if you change
  11.         anything in here!
  12.                 Mike Kelly
  13.  
  14.     07/23/83 v1.1    Added #define of CLOCK, NOCLOCK, LCDAV, LCEMPTY.
  15.     07/05/83 v1.0    Added #define DEBUG to control compilation
  16.             of "if(debug)" code.
  17.     07/03/83 v1.0    Added stop_that (indicates a ctl-K or K received
  18.             deleted).
  19.             from the keyboard in portout routine).
  20.     06/28/83 v1.0    Added msg_delete (indicates if message is
  21.     06/25/83 v1.0    updated
  22.     05/17/83 v1.0    written
  23. */
  24.  
  25.  
  26. #define DEBUG      1            /* comment this out so the */
  27.                     /*  "if(debug)" code does NOT */
  28.                     /*  get compiled */
  29.  
  30.  
  31. /*
  32. #define CLOCK      1            /* if you have a clock board then */
  33.                     /*  this define wants to be  */
  34.                     /*  uncommented and NOCLOCK should */
  35.                     /*  be commented */
  36. */
  37.  
  38. #define NOCLOCK      1            /* uncomment this if you do NOT have */
  39.                     /*  a clock board */
  40.  
  41.  
  42. /* --------------------------------------------------------------------- */
  43.  
  44. #define CLEAR      'E'            /* clear screen on z-19 */
  45. #define ESC      0x1b
  46. #define CR      0x0d
  47. #define LF      0x0a
  48. #define BELL      0x07            /* Avon calling */
  49. #define CRLF      "\r\n"        /* <cr><lf> */
  50. #define CTL_D      0x04            /* <ctl-d> */
  51. #define CTL_K      0x0b            /* <ctl-k> */
  52. #define CTL_X      0x18            /* <ctl-x> */
  53.  
  54. #define BREAKCNT  5000            /* max count to allow for    */
  55.                     /*   status routines to loop */
  56. #define STATMAX      2000            /* used by stat debug routine */
  57.  
  58. #define LCDATA      0x02            /* local console data port   */
  59. #define LCSTAT      0x03            /* local console status port */
  60. #define LCDAV      0x02            /* local console data avail. mask */
  61. #define LCEMPTY      0x01            /* local console transmit buffer */
  62.                     /*  empty mask */
  63.  
  64. #define GBI4PDATA 0x10            /* data port   */
  65. #define GBI4PSTAT GBI4PDATA+1        /* status port */
  66. #define GBI4PCMD  GBI4PDATA+3        /* command port */
  67. #define GBI4PSEL  GBI4PDATA+7        /* user select port */
  68. #define GBI4PMODE GBI4PDATA+2        /* mode port */
  69.  
  70. #define SDSREADY  0x80            /* data set ready */
  71. #define SCARRIER  0x40            /* carrier detect */
  72. #define SFRAME      0x20            /* framing error  */
  73. #define SOVERRUN  0x10            /* overrun error  */
  74. #define SDAV      0x02            /* character waiting */
  75. #define SEMPTY      0x01            /* transmit buffer empty */
  76.  
  77. #define USER5      5            /* user number 5=not used    */
  78. #define USER6      6            /* user number 6=chronograph */
  79. #define USER7      7            /* user number 7=Smart modem */
  80.  
  81. #define WELCOME      "WELCOME.BBS"        /* file name */
  82. #define BULLETINS "BULLETIN.BBS"    /* file name */
  83. #define USERS      "USERS.BBS"        /* file name */
  84. #define USERX      "USERS.$$$"        /* file name */
  85. #define MESSAGES  "MESSAGES.BBS"    /* file name */
  86. #define MSGX1      "MESSAGES.$$1"    /* file name */
  87. #define MSGX2      "MESSAGES.$$2"    /* file name */
  88. #define HELP      "HELP.BBS"        /* file name */
  89.  
  90. /*            defines used by the bbscfile.c routine */
  91.  
  92. #define HEADER    "HEADER.BBS"    /* file name */
  93. #define MSG1MAX 104        /* max. piece of message to put in 128 */
  94.                 /*  byte chunk of msg file */
  95. #define MSGSECT 128        /* size of message sector */
  96.  
  97. /*            end of defines used by the bbscfile.c routine */
  98.  
  99.             /* global variables */
  100. char    portin(),            /* in routine returns a character */
  101.     *gb4sin(),            /* returns pointer to character */
  102.  
  103.     ibuf[BUFSIZ],            /* handy input buffer */
  104.     obuf[BUFSIZ],            /* another handy buffer */
  105.     iobuf[BUFSIZ],            /* buffer used to read/write user file */
  106.  
  107.     w_fname[25],            /* first name on signon */
  108.     w_lname[25],            /* last  name on signon */
  109.     w_password[10],            /* password   on signon */
  110.     *passptr;            /* ptr to password */
  111.  
  112.             /* define user file fields */
  113. char    u_fname[25],
  114.     u_lname[25],
  115.     u_password[5],
  116.     u_time1[12],            /* first time on system */
  117.     u_date1[9],            /* first date on system */
  118.     u_time2[12],            /* last  time on system */
  119.     u_date2[9],            /* last  date on system */
  120.     u_city[31];            /* city, state */
  121.  
  122.             /* define message file fields    */
  123. char    msg_no[11],            /* message number */
  124.     msg_date[9],            /* date of message */
  125.     msg_time[15],            /* time of message */
  126.     msg_to[21],            /* who message is to */
  127.     msg_from[21],            /* who message is from */
  128.     msg_pass[11],            /* password */
  129.     msg_subject[21],        /* what it's all about */
  130.     msg_text[842],            /* text of message 20 lines */
  131.                     /*  by 40 wide */
  132.     msg_delete[2];            /* indicates msg status */
  133.                     /*  0 = active */
  134.                     /*  9 = deleted */
  135.  
  136.  
  137. int    debug,                /* switch for debug mode */
  138.     offline,            /* switch for offline mode */
  139.     xpert,                /* switch */
  140.     active,                /* indicates if logged on */
  141.     statcnt,            /* count used for status routines */
  142.     stop_that;            /* switch - true indicates ctl-K */
  143.                     /*  or K received in portout routine */
  144.             /* date/time fields - used by bbsclock.c */
  145. char    mm[3],
  146.     dd[3],
  147.     yy[3],
  148.     month[20],            /* ie. January */
  149.     day[3],                /* dd */
  150.     year[5],            /* 19yy */
  151.     date[30],            /* ie. January 31, 1983 */ 
  152.     week[20],            /* day of week Monday, Tuesday... */
  153.     time[12];            /* time of day  HH:MM:SS xM */
  154.                     /*          where x = A or P */
  155.  
  156. /*            variables used by the bbscfile.c routine */
  157.  
  158. char    h_next_msg[10],        /* next avail. message # */
  159.     h_date[10];        /* last update date of header file */
  160. int    h_next;            /* next avail. message # in integer */
  161.  
  162. /*            end of variables used by bbscfile.c */
  163.  
  164.             /* end of globals */
  165.  
  166. /* end of program */
  167.  
  168.